import java.util.Scanner;

// HJ37 统计每个月兔子的总数
public class HJ37 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int b = n / 3;
            int num = (int) Math.pow(2, b);
            System.out.println(num);
        }
    }
}
